<?php if (!defined('THINK_PATH')) exit();if(is_array($parenterm)): $i = 0; $__LIST__ = $parenterm;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>

<tr id="node_<?php echo $data['id']; ?>" class="parent_id_<?php echo $data['parent_id']; ?>">
    <td width="20" align="left">
        <input  name="deletec" id="deletec" type="checkbox"/>
    </td>
    <td>
        <input name="listorder[<?php echo $data['id']; ?>]" class="listorder"  type="text" data-orderid="<?php echo $data['id']; ?>"
               value="<?php echo $data['listorder']; ?>" style="width:35px;" />
    </td>
    <td style="text-align: left"><?php echo $data['id']; ?></td>
    <td id="term_id_<?php echo $data['id']; ?>" class="<?php echo $a = D('term')->hasChild($data['id'])?'hasChild':''; ?>">
        <?php  $countpath = D('Term')->depth($data['parent_id']); $path = (count(array_unique($countpath)));         $str= '';
        for($i=0;$i<$path;$i++)
            {
                $str.="&nbsp;&nbsp;&nbsp;";
            }
        echo $str;
         echo $a ? '<img src="__ADMINLTE__dist/img/colum1nx.gif" id="term_img_'.$data["id"].'" />' : '<span style="width:12px;display: inline-block;"></span>'; echo $data['name']; ?>
    </td>
    <td>模型栏目</td>
    <td><?php if((isset($modelList[$data['model_id']]))): echo $modelList[$data['model_id']]; endif; ?></td>
    <td>&nbsp;
        <?php if(( $data['display_nav'] == 1)): ?>
        <span class="fa fa-check" style="color: #00a65a"></span>
        <?php else: ?>
        <span class="fa fa-close" style="color:#dd4b39"></span>
        <?php endif; ?>
        <!--<?php if(( $data['display_nav'] == 1)): ?>-->
        <!--显示<?php else: ?>不显示-->
        <!--<?php endif; ?>-->
    </td>
    <td>
        
        <a href="<?php echo U('Term/editTerm',array('id'=>$data['id'])); ?>" class="btn btn-primary btn-xs">修改</a>
        <a href="<?php echo U('Term/delTerm',array('id'=>$data['id'])); ?>" class="btn btn-success btn-xs">删除</a>
		<a href="<?php echo U('Term/addTerm',array('model_id'=>$data['model_id'],'parent_id'=>$data['id'])); ?>" class="btn btn-info btn-xs">添加子栏目</a>
        <!-- 新闻 -->
        <?php $find_add_term = in_array($data['id'],$result); if((!$find_add_term)): ?>
        <a href="<?php echo U('Content/index',['term_id'=>$data['id']]); ?>" class="btn btn-danger btn-xs">
            查看列表
        </a>
        <?php endif; ?>

    </td>

</tr>

<?php endforeach; endif; else: echo "" ;endif; ?>
